xen/dts: Don't translate invalid address
authorJulien Grall <julien.grall@linaro.org>
Mon, 6 Jan 2014 16:36:18 +0000 (16:36 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 9 Jan 2014 15:24:26 +0000 (15:24 +0000)
commit0b1d127081896411bf91693acb1932345e0e627a
treefcb30a1396f57fabd5d1a7c26770abf9d674af4e
parent025c1b755afc9a9f42f71ef167c20fdc616b1d2d
xen/dts: Don't translate invalid address

ePAR specifies that if the property "ranges" doesn't exist in a bus node:

"it is assumed that no mapping exists between children of node and the parent
address space".

Modify dt_number_of_address to check if the list of ranges are valid. Return
0 (ie there is zero range) if the list is not valid.

This patch has been tested on the Arndale where the bug can occur with the
'/hdmi' node.

Reported-by: <tsahee@gmx.com>
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/common/device_tree.c